package com.job.yangshida.homework11and12.homework0711;

/**
 * @author 杨士达
 * @version 1.0
 * @since 2022-07-12 13:39:43
 */
public class TestCup {
    public static void main(String[] args) {
        Cup cup=new Cup("富光保温杯", 50d, 500d, "黑");
        System.out.println(cup);
        Cup cup1=new Cup("富光保温杯", 50d, 500d, "黑");
        System.out.println(cup==cup1);
        System.out.println(cup.equals(cup1));
        //重写equals比较;两个对象的特征
        //哈希协定 相等的俩对象的哈希值也必须相等
        //原本哈希和equal都是比地址,改成比特征
        //四类八中包装类都重写了equal和哈希

    }
}
